#include <bits/stdc++.h>

using namespace std;

class Solution {
 public:
  bool isArraySpecial(vector<int>& nums) {
    for (auto i = 1; i < nums.size(); i++) {
      if (((nums[i] + nums[i - 1]) & 1) == 0) {
        return false;
      }
    }
    return true;
  }
};

int main(int argc, const char** argv) {
  Solution solution = Solution();
  vector<int> in = {2, 1, 1};
  bool res = solution.isArraySpecial(in);
  std::cout << res << std::endl;
  return 0;
}